﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using Tebbee.Business.Server.Common.Email;
using Tebbee.Business.Server.Common.IO;
using Tebbee.Business.Server.Common.Image;

namespace Tebbee.Business.Server
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the class name "Utilities" in code, svc and config file together.
    // NOTE: In order to launch WCF Test Client for testing this service, please select Utilities.svc or Utilities.svc.cs at the Solution Explorer and start debugging.
    public class Utilities : IUtilities
    {

        public bool WriteFile(string saveString, string path)
        {
            return FileIO.WriteFile(saveString, path);
        }

        public string ReadFile(string path)
        {
            return FileIO.ReadFile(path);
        }


        public void SendMail(string to, string content, string subject)
        {
            TebbeeMail.SendMail(to, content, subject);
        }


        public void ResizeImg(System.Drawing.Image Original, int newWidth, int newHeight, string pathToSave)
        {
            ResizeImage.ResizeImg(Original, newWidth, newHeight, pathToSave);
        }
    }
}
